package com.elephant.createBan.factoryMethodCreateBean;

import com.elephant.bean.MyClassPathXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 林
 * @create 2025-06-16 16:51
 */
public class TestFactoryMethod {

	public static void main(String[] args) {

		ClassPathXmlApplicationContext applicationContext =
				new MyClassPathXmlApplicationContext("TestFactoryMethodCreateBean.xml");

		Person person = (Person) applicationContext.getBean("person");
		Person person2 = (Person) applicationContext.getBean("person2");


		System.out.println(person.toString());
		System.out.println(person2.toString());
	}
}
